const dao = require('../dao/loginDao');
const router = require('express').Router();

router.get('/GetCompanyName', (req, res) => {
  const companyName = req.query['CompanyName'] || 'defaultValue';
  const data = dao.getCompanyName(companyName);
  res.json(data);
});

router.post('/Login', (req, res) => {
  const requestData = req.body || {};
  const result = dao.login(requestData);
  res.json(result);
})

module.exports= router;
